ROTATION tells train to rotate at rate specified by "rotate". Use '0 0 0' to stop rotation.
ANGLES tells train to rotate to the angles specified by "angles" while traveling to this path_rotate. Use values < 0 or > 360 to guarantee that it turns in a certain direction. Having this flag set automatically clears any rotation.
STOP tells the train to stop and wait to be retriggered.
NO_ROTATE tells the train to stop rotating when waiting to be triggered.
DAMAGE tells the train to cause damage based on "dmg".
MOVETIME tells the train to interpret "speed" as the length of time to take moving from one corner to another.
SET_DAMAGE tells the train to set all targets damage to "dmg"
"noise" contains the name of the sound to play when train stops.
"noise1" contains the name of the sound to play when train moves.
"event" is a target to trigger when train arrives at path_rotate.
*/
void() path_rotate =
{
if ( self.noise )
{
precache_sound( self.noise );
}
if ( self.noise1 )
{
precache_sound( self.noise1 );
}
};
void() rotate_train;
void() rotate_train_next;
void() rotate_train_find;
void() rotate_train_think =
{
local float t;
local float timeelapsed;
t = time - self.ltime;
self.ltime = time;
if ( ( self.endtime ) && ( time >= self.endtime ) )